﻿GameMaintenance = {};

GameMaintenance.PostForm = function (postUrl, callback, error) {
    var pd = $("form").serialize();
    $.ajax({
        url: postUrl,
        data: pd,
        type: 'POST',
        dataType: "json",
        success: function (response) {
            if (callback != null)
                callback(response);
        },
        error: function (response) {
            alert("post error");
            if (error != null)
                error(response);
        }
    });
};